import request from '@/utils/request'

export function getEmployees() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}

export function getEmployeeList(params) {
  return request({
    url: '/sys/user',
    method: 'get',
    params
  })
}

export function delEmployee(id) {
  return request({
    url: '/sys/user/' + id,
    method: 'delete'
  })
}

export function addEmployee(data) {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}

export function importEmployee(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}

export function updateUseInfo(data) {
  return request({
    url: '/sys/user/' + data.id,
    method: 'put',
    data
  })
}

export function assignRoles(data) {
  return request({
    url: '/sys/user/assignRoles',
    method: 'put',
    data
  })
}
